package org.dromara.mall.domain.bo;

import org.dromara.mall.domain.Member;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;
import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 会员管理业务对象 member
 *
 * @author Mr Lei QQ：235921049
 * @date 2024-07-05
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = Member.class, reverseConvertGenerate = false)
public class MemberBo extends BaseEntity {

    /**
     * 
     */
    @NotBlank(message = "不能为空", groups = { EditGroup.class })
    private String id;

    /**
     * 用户名
     */
    @NotBlank(message = "用户名不能为空", groups = { AddGroup.class, EditGroup.class })
    private String username;

    /**
     * 密码
     */
    private String password;

    /**
     * 支付密码
     */
    private String payPassword;

    /**
     * 昵称
     */
    private String nickname;

    /**
     * 性别
     */
    private String gender;

    /**
     * 头像
     */
    private String avatar;

    /**
     * 
     */
    private String ossId;

    /**
     * 用户类别
     */
    private String rolesId;

    /**
     * 电话
     */
    private String mobile;

    /**
     * 邮箱
     */
    private String email;

    /**
     * 余额
     */
    private BigDecimal money;

    /**
     * 冻结资金
     */
    private BigDecimal frozenMoney;

    /**
     * 积分
     */
    private BigDecimal integral;

    /**
     * 邀请人ID
     */
    @NotBlank(message = "邀请人ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private String inviterId;

    /**
     * 账号状态
     */
    @NotBlank(message = "账号状态不能为空", groups = { AddGroup.class, EditGroup.class })
    private String status;

    /**
     * 失效时间
     */
    @NotNull(message = "失效时间不能为空", groups = { AddGroup.class, EditGroup.class })
    private Date invalidTime;

    /**
     * 登陆IP
     */
    @NotBlank(message = "登陆IP不能为空", groups = { AddGroup.class, EditGroup.class })
    private String ip;

    /**
     * 登陆时间
     */
    @NotNull(message = "登陆时间不能为空", groups = { AddGroup.class, EditGroup.class })
    private Date loginTime;

    /**
     * 最后一次登陆
     */
    @NotNull(message = "最后一次登陆不能为空", groups = { AddGroup.class, EditGroup.class })
    private Date lastLoginTime;


}
